<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.easidea.tim.service.saleorder.SaleOrderService"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="com.easidea.tim.entity.saleorder.SaleOrder"%>
<%@page import="com.easidea.tim.entity.saleorder.SaleOrderItem"%>
<%@page import="com.easidea.tim.dao.saleorder.SaleOrderItemDao"%>
<%@page import="com.easidea.tim.service.inventory.StorageService"%>
<%@page import="org.hibernate.Session"%>
<%@page import="com.easidea.tim.service.inventory.CheckInOutService"%>
<%
	String name = request.getParameter("name").toString();
	String meterstring = request.getParameter("meterstring").toString();
	String color = request.getParameter("color").toString();
	String pi = request.getParameter("pi").toString();
	String intype= request.getParameter("intype").toString();
	String flowno= request.getParameter("flowno").toString();

	CheckInOutService checkInOutService = new CheckInOutService();

	WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext());
	short result = ((CheckInOutService)wac.getBean("checkInOutService")).pageCheckInOutCio(name,color,meterstring,pi,intype,flowno);
 %>
<?xml version="1.0" encoding="GB2312"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="入库结束">

	<%
		if(result == 0){
	 %>
	 <a href="incharge.wml">入库成功，点此继续</a>
	 <%
	 }else if(result == -1){
	  %>
	  <a href="incharge_detail.jsp?name=<%=name %>&color=<%=color %>&pinum=<%=pi %>">数据错误，订单号不存在，点此返回</a>
	  <%
	  }else if(result == -2){
	   %>
	    <a href="incharge_detail.jsp?name=<%=name %>&color=<%=color %>&pinum=<%=pi %>">数据错误，产品资料存在（品名或者色号错误），点此返回</a>
	   <%
	   }
	    %>
<a href="menu.wml">返回菜单</a>
	</card>
	</wml>
 
